/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package escr.persistencia;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author Aditardo
 */
@Entity
@Table(name = "menu")
@NamedQueries({@NamedQuery(name = "Menu.findByIdMenu", query = "SELECT m FROM Menu m WHERE m.idMenu = :idMenu"), @NamedQuery(name = "Menu.findByRefTitulomenu", query = "SELECT m FROM Menu m WHERE m.refTitulomenu = :refTitulomenu"), @NamedQuery(name = "Menu.findByNumMenu", query = "SELECT m FROM Menu m WHERE m.numMenu = :numMenu"), @NamedQuery(name = "Menu.findByNomMenu", query = "SELECT m FROM Menu m WHERE m.nomMenu = :nomMenu"), @NamedQuery(name = "Menu.findByReferenciMenu", query = "SELECT m FROM Menu m WHERE m.referenciMenu = :referenciMenu"), @NamedQuery(name = "Menu.findByNumSubmenu", query = "SELECT m FROM Menu m WHERE m.numSubmenu = :numSubmenu")})
public class Menu implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Column(name = "idMenu", nullable = false)
    private Integer idMenu;
    @Column(name = "refTitulomenu")
    private String refTitulomenu;
    @Column(name = "numMenu")
    private Integer numMenu;
    @Column(name = "nomMenu")
    private String nomMenu;
    @Column(name = "referenciMenu")
    private String referenciMenu;
    @Column(name = "numSubmenu")
    private Integer numSubmenu;

    public Menu() {
    }

    public Menu(Integer idMenu) {
        this.idMenu = idMenu;
    }

    public Integer getIdMenu() {
        return idMenu;
    }

    public void setIdMenu(Integer idMenu) {
        this.idMenu = idMenu;
    }

    public String getRefTitulomenu() {
        return refTitulomenu;
    }

    public void setRefTitulomenu(String refTitulomenu) {
        this.refTitulomenu = refTitulomenu;
    }

    public Integer getNumMenu() {
        return numMenu;
    }

    public void setNumMenu(Integer numMenu) {
        this.numMenu = numMenu;
    }

    public String getNomMenu() {
        return nomMenu;
    }

    public void setNomMenu(String nomMenu) {
        this.nomMenu = nomMenu;
    }

    public String getReferenciMenu() {
        return referenciMenu;
    }

    public void setReferenciMenu(String referenciMenu) {
        this.referenciMenu = referenciMenu;
    }

    public Integer getNumSubmenu() {
        return numSubmenu;
    }

    public void setNumSubmenu(Integer numSubmenu) {
        this.numSubmenu = numSubmenu;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idMenu != null ? idMenu.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Menu)) {
            return false;
        }
        Menu other = (Menu) object;
        if ((this.idMenu == null && other.idMenu != null) || (this.idMenu != null && !this.idMenu.equals(other.idMenu))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "escr.persistencia.Menu[idMenu=" + idMenu + "]";
    }

}
